<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
<!--
	var charset = '<?php echo CHARSET;?>';
	var uploadurl = '<?php echo pc_base::load_config('system','upload_url')?>';
//-->
</script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>content_addtop.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>colorpicker.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>hotkeys.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>cookie.js"></script>
<div class="subnav">
	<div class="content-menu ib-a blue">
		<a class="fb" href="?m=resource&c=manage&a=init&id=<?php echo $data['id'];?>&bindtype=<?php echo $_GET['bindtype']?>"><em><?php echo L('resource_manage');?></em></a>
		<span>|</span>
		<?php if($_GET['bindtype'] == 1):?>
		<a href="javascript:;" class="add"><em><?php echo L('resource_add');?></em></a>
		<?php endif;?>

	</div>
</div>
<form method="post" action="?m=resource&c=manage&a=add" id="myform" enctype="multipart/form-data">
<div class="pad-10">
<div class="col-tab">
<div id="div_setting_1" class="contentList pad-10">
	<table width="100%" class="table_form ">
		<tbody>
		<tr>
			<th width="200"><font color="red">*</font><?php echo L('name')?>：</th>
			<td><input name="resource[title]" id="title" class="input-text" type="text" size="40"></td>
		</tr>
		<tr>
			<th><?php echo L('describtion')?>：</th>
			<td><textarea name="resource[description]" id="description" cols="50" rows="6"></textarea></td>
		</tr>
		<tr>
			<th><?php echo L('thumb')?>：</th>
			<td><?php echo form::images('resource[thumb]', 'thumb', '', 'resource', '', 40, '', '', '', array(350, 350))?></td>
		</tr>
		<tr>
			<th><font color="red">*</font><?php echo L('content')?>：</th>
			<td><?php echo form::upfiles('resource[content]', 'content', '', '', '', '', '', '', 'jpg|jpeg|gif|bmp|png|mp3|mp4|avi|doc|docx|xls|xlsx|csv|ppt|pptx|pdf|txt|rar|zip|swf')?></td>
		</tr>
		<tr style="display: none;">
			<th>关联ID：</th>
			<td><input type="hidden" name="resource[catid]" value="<?php echo $_GET['relevance_id']?>"></td>
		</tr>
		<tr style="display: none;">
			<th>绑定类型：</th>
			<td><input type="hidden" name="resource[bindtype]" value="<?php echo $_GET['bindtype']?>" /></td>
		</tr>
   		</tbody>
   </table>
</div>
	 <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="button">
</div></div>
</form>
</body>
</html>
